## Reading layer `rts_polygons_for_Yili_May_2022_v2' from data source
## `/home/hrodenhizer/Documents/permafrost_pathways/rts_mapping/rts_data_comparison/data/rts_polygons/rts_polygons_for_Yili_May_2022_v2.shp'
## using driver `ESRI Shapefile'
## Simple feature collection with 138 features and 11 fields
## Geometry type: POLYGON
## Dimension: XY
## Bounding box: xmin: -139.218 ymin: 68.99102 xmax: 124.304 ymax: 72.99794
## Geodetic CRS: WGS 84
## [1] "There are 69 prediction tiles."
## [1] "There are 138 input data tiles."
Join Prediction Polygons into polys SF Dataframe
Join Validation Polygons into polys SF Dataframe
## # A tibble: 3 × 2
## imagery mean_iou
## <chr> <dbl>
## 1 Maxar 0.66
## 2 Planet 0.64
## 3 Sentinel-2 0.64
Precision measures false positives. Recall measures false negatives.
This figure will only be interesting once we have added in negative training data.
## Warning: attribute variables are assumed to be spatially constant throughout
## all geometries
## # A tibble: 2 × 5
## yg mean_size min_size max_size median_size
## <chr> <dbl> <dbl> <dbl> <dbl>
## 1 Other 20702. 484 107280 10484
## 2 Yamal/Gydan 11290. 512 47548 5732
Raw IoU Scores:
This is complicated by the fact that the rts_area column is calculated from the raster validation layer, which may contain several RTS features within one tile. Use rts_area (from the original RTS delineation), instead.
Run nls models and bootstrap parameters
Bootstrap predictions for plotting the nls models
Plot the Size/Performance plot
## # A tibble: 3 × 7
## imagery p_val x_pos star_y_pos label_y_pos p_label star_label
## <fct> <dbl> <dbl> <dbl> <dbl> <chr> <chr>
## 1 Maxar 0.962 1.5 0.9 0.95 p-value = 0.962 ""
## 2 Planet 0.458 1.5 0.9 0.95 p-value = 0.458 ""
## 3 Sentinel-2 0.528 1.5 0.9 0.95 p-value = 0.528 ""
It is possible to get rid of the inner panel borders, if I decide that looks better: https://stackoverflow.com/questions/46220242/ggplot2-outside-panel-border-when-using-facet
This approach first uses the 95% CI of the model parameters to determine whether RTS features were predicted better or worse than expected based on the model. Next, the threshold at which RTS size doesn’t impact IoU is determined from where the slope of the model approaches 0 (currently using slope < 1e-06) for each imagery type. RTS features smaller than this threshold that were predicted better than expected are analyzed later to determine why some small RTS can be identified from the imagery.
These plots summarize the input data values (mean or standard
deviation) in RTS cells, background cells, and the normalized difference
between the two (Delta = (RTS - Background)/Background).
Most of the input layer names should be self explanatory, but for the
others:
lum = luminance
= 0.299*r + 0.587*g + 0.114*b
sr = shaded relief
A few takeaway points: